
/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

window.Vue = require('vue');

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

//Vue.component('example-component', require('./components/ExampleComponent.vue'));
Vue.component('heart-use-component', require('./components/HeartUseComponent.vue'));

Vue.component('rule-and-recode-component', require('./components/RuleAndRecodeComponent.vue'));

Vue.component('my-loading', require('./components/MyLoadingComponent.vue'));

Vue.component('my-tips', require('./components/MyTipsComponent.vue'));

const app = new Vue({
    el: '#app',
    beforeCreate:function () {
        this.loading_show = true;
        console.log('before');
    },
    created:function () {
        this.loading_show = false;
        console.log('created');
    },
    data(){
        return {
            loading_show:false,
            tips_data:{t_show:false,t_msg:''},
        }
    },
    methods:{
        loadingOC:function (status) {
            this.loading_show = status;
        },
        tipsOC:function (data) {
            this.tips_data.t_show = data.t_show;
            this.tips_data.t_msg = data.t_msg;
        }
    },
});
